import { HostConnConfPropsNameType } from '@common'

export type HostConnConfFormItemShowType = Record<HostConnConfPropsNameType, boolean>

const FormItemShowDir: HostConnConfFormItemShowType = {
  type: true,
  parent: true,
  name: true,
  priority: true,
  host: false,
  port: false,
  username: false,
  password: false,
  icon: true,
  color: false,
  remark: true
}

const FormItemShowHost: HostConnConfFormItemShowType = {
  type: true,
  parent: true,
  name: true,
  priority: true,
  host: true,
  port: true,
  username: true,
  password: true,
  icon: true,
  color: true,
  remark: true
}

export const FormItemShow = {
  [HostConnConfTypeConst.DIR]: FormItemShowDir,
  [HostConnConfTypeConst.HOST]: FormItemShowHost
}
